package text;

import java.util.Objects;

public class Employee {
    private Integer empId;   //编号
    private  String empName; //姓名
    private  Double money; //工资

    public Employee(){}

    public Employee(Integer empId){
        this.empId=empId;
    }

    public Employee(Integer empId, String empName, Double money) {
        this.empId = empId;
        this.empName = empName;
        this.money = money;
    }

    public Integer getEmpId() {
        return empId;
    }

    public void setEmpId(Integer empId) {
        this.empId = empId;
    }

    public String getEmpName() {
        return empName;
    }

    public void setEmpName(String empName) {
        this.empName = empName;
    }

    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Employee employee = (Employee) o;
        return Objects.equals(empId, employee.empId) &&
                Objects.equals(empName, employee.empName) &&
                Objects.equals(money, employee.money);
    }

    @Override
    public int hashCode() {
        return Objects.hash(empId, empName, money);
    }
}
